package net.csdn.business.common.domain.request;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.csdn.business.common.domain.validation.groups.System;

import javax.validation.constraints.NotBlank;

/**
 * @author wanghang
 * @version 1.0
 * @date 2022/7/26 16:37
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthNameSpaceDto {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 被授权用户id
     */
    private String userId;
    private String username;

    /**
     * 命名空间
     */
    @NotBlank(message = "path 不能为空")
    private String path;

    /**
     * 命名空间（中文名）
     */
    private String pathName;

    /**
     * 当前用户
     */
    @NotBlank(message = "crrUsername 不能为空", groups = {System.class})
    private String crrUsername;


}